<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="_patrimonio.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">

			<h:form id="form">
				
				<p:dataTable id="listFornecedor" value="#{itemBean.itens}" emptyMessage="Não Encontrado"
					var="item" paginator="true" selectionMode="single" rows="15" style="font-size: 11px">

					<f:facet name="header">
						<h:outputText value="ITENS CADASTRADOS POR NOTA FISCAL" />
					</f:facet>

					<p:column sortBy="#{item.material.nome}" filterBy="#{item.material.nome}" filterMatchMode="contains"
						headerText="Descrição">
						<h:outputText value="#{item.material.nome}" />
					</p:column>
					
					<p:column sortBy="#{item.marca}" filterBy="#{item.marca}" filterMatchMode="contains"
						headerText="Marca">
						<h:outputText value="#{item.marca}" />
					</p:column>
					
					<p:column headerText="Valor Unitário">
						<h:outputText value="#{item.valor_unit}">
							<f:convertNumber pattern="#0.00" />
						</h:outputText>	
					</p:column>					
					
					<p:column headerText="Quantidade">
						<h:outputText value="#{item.quantidade}" />
					</p:column>

					<p:column headerText="Valro Total">
						<h:outputText value="#{item.total2}">
							<f:convertNumber type="currency" currencySymbol="R$"
								locale="pt_BR" />
						</h:outputText>		
					</p:column>

					<p:column sortBy="#{item.nota.numero}" filterBy="#{item.nota.numero}" filterMatchMode="contains"
						headerText="Nota Fiscal">
						<h:outputText value="#{item.nota.numero}" />
					</p:column>
					
					<p:column sortBy="#{item.nota.fornecedor.nome}" filterBy="#{item.nota.fornecedor.nome}" filterMatchMode="contains"
						headerText="Fornecedor">
						<h:outputText value="#{item.nota.fornecedor.nome}" />
					</p:column>
					
					<p:column sortBy="#{item.nota.empenho.numero}" filterBy="#{item.nota.empenho.numero}" filterMatchMode="contains"
						headerText="Empenho">
						<h:outputText value="#{item.nota.empenho.numero}" />
					</p:column>
					
				</p:dataTable>


			</h:form>
		</div>


	</ui:define>
</ui:composition>
</html>